#!/src/bin/perl -w
$filename = "corpus/amants.txt";
chomp($filename);
open (FileInput, $filename)||die "Can't open file";
open (FileOutput, '>dernier_mot.txt');
while ($line = <FileInput>) 
{
	@liste_mots = split(/ /,$line);
	print FileOutput $liste_mots[$#liste_mots];

}
close(FileInput);
close(FileOutput); 